/*
 * LogFactoryAppender.h
 *
 *  Created on: 20.09.2011
 *      Author: sili
 */

#ifndef LOGFACTORYAPPENDER_H_
#define LOGFACTORYAPPENDER_H_

#include "Controller.h"
#include "LogFactory.h"
#include "log4cxx/appenderskeleton.h"
#include "log4cxx/spi/loggingevent.h"
#include <iostream>
#include <fstream>


using namespace log4cxx;

class LogFactoryAppender : AppenderSkeleton{
		public:
			void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
			void close() {};
			bool isClosed() const { return closed; }
			bool requiresLayout() const { return false; }

			LogFactoryAppender();
			virtual ~LogFactoryAppender();

			DECLARE_LOG4CXX_OBJECT(LogFactoryAppender)
			BEGIN_LOG4CXX_CAST_MAP()
				LOG4CXX_CAST_ENTRY(LogFactoryAppender)
				LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
			END_LOG4CXX_CAST_MAP()
	};

#endif /* LOGFACTORYAPPENDER_H_ */
